package main

/*******************************************************************************
Copyright:cloud
Author:cloudapex@126.com
Version:1.0
Date:2016-6-18
Description:Ghost机器人工具
	# go build -o ./bin/GRobot.exe
*******************************************************************************/
import (
	. "Ghost/utd"
	"Ghosted/util"
	"flag"
)

var commands = TStringArray{}

func main() {
	flag.Var(&LoginHost, "host", "Destination login server address (mult times).")
	flag.Var(&commands, "cmd", "Automatic execution of console commands in sequence(mult times).")

	util.Init("RobotTool", 1, 1, 1, nil)

	util.Work(func() { addCommands(commands) })
}

func addCommands(arr TStringArray) {
	if len(commands) == 0 {
		return
	}
	for _, cmdstr := range commands {
		theMSCmd.CastCommand(cmdstr)
	}
}
